package traveldream.ejb.sessionBean;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import traveldream.ejb.DTO.ExcursionDTO;
import traveldream.ejb.entities.Excursion;
import traveldream.ejb.interfaces.ExcursionInsertionBeanLocal;

/**
 * Session Bean implementation class ExcursionInsertionBean
 */
@Stateless
public class ExcursionInsertionBean implements ExcursionInsertionBeanLocal {

	
	@PersistenceContext
	private EntityManager em;
	
    /**
     * Default constructor. 
     */
    public ExcursionInsertionBean() {
        // TODO Auto-generated constructor stub
    }
    
    public void insert(ExcursionDTO eDTO){
    		Excursion e = new Excursion(eDTO);
    		em.persist(e);
    }

}